import Immutable from 'immutable';

const defaultState = new Immutable.List();

export default function unitReducer(state = defaultState, action) {
  switch(action.type) {
    case 'LOAD_UNITS':
      return action.data;
    case 'ERROR_UNITS':
      return action.error.status;
    default:
      return state;
  }
}
